//#define _CRT_SECURE_NO_WARNINGS 1
//#include <stdio.h>
//#include <windows.h>
//#define S 1
//
////int ShopFun(int x)
////{
////	int bottle = x / S;
////	int result = x / S;
////	while (bottle > 1){
////		result += bottle / 2 ;
////		bottle = bottle / 2 + bottle % 2;
////	}
////	return result;
////}
////
////int main()
////{
////	int money;
////	scanf("%d", &money);
////	printf("%d\n", ShopFun(money));
////	system("pause");
////	return 0;
////}
//
//
//int main()
//{
//	int i = 0;
//	int sum = 0;//保存最终结果
//	int n = 0;
//	//保存n的阶乘
//	scanf("%d", &n);
//	for (i = 1; i <= n; i++)
//	{
//		int ret = 1;
//		int j = 0;
//		for (j = 1; j <= i; j++)
//		{
//			ret *= j;
//		}
//		sum += ret;
//	}
//	printf("%d\n", sum);
//	system("pause");
//	return 0;
//}